package es.ihatetothink.restaurantesCeliacos;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.Spinner;

public class Feed extends Activity{
	private EditText comentario;
	private Spinner tema;
	public void onCreate(Bundle savedInstanceState){
	    super.onCreate(savedInstanceState);
	    setContentView(R.layout.feed);
	   comentario = (EditText) findViewById(R.id.comentario);
	    tema = (Spinner) findViewById(R.id.spinner1);
	    
	}
	public void enviar(View view){
		final Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
		 
		emailIntent .setType("plain/text");
		 
		emailIntent .putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{"ihatetothink@hotmail.com"});
		 
		emailIntent .putExtra(android.content.Intent.EXTRA_SUBJECT, "CELIACOS "+tema.getSelectedItem().toString());
		 
		emailIntent .putExtra(android.content.Intent.EXTRA_TEXT, comentario.getText().toString());
		 
		this.startActivity(Intent.createChooser(emailIntent, "enviando email.."));
	}
}
